<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@ taglib prefix="sjt" uri="/struts-jquery-tree-tags"%>
<html>
<head>
<title>Welcome!</title>

<link rel="stylesheet" type="text/css" media="screen"
	href="<s:url value="/resources/coolmenu/styles/global.css"/>" />
<link rel="stylesheet" type="text/css" media="screen"
	href="<s:url value="/resources/coolmenu/styles/coolmenu.css"/>" />

<script type="text/javascript"
	src="<s:url value="/resources/coolmenu/scripts/coolmenus4.js"/>"></script>
<script type="text/javascript"
	src="<s:url value="/resources/coolmenu/scripts/cm_addins.js"/>"></script>
</head>
<body>
	<h2>Dynamic Tree with AJAX Links and Contextmenu</h2>
    <p class="text">
        A Tree Component rendered on the server with AJAX Links and Contextmenu.
    </p>
		<s:url id="echo" value="/echo.action"/>
    	<sjt:tree 
    		id="treeDynamicAjax" 
    		jstreetheme="apple"
    		rootNode="nodes"
    		childCollectionProperty="children"
    		nodeTitleProperty="title"
    		nodeIdProperty="id"
    		nodeHref="%{echo}"
    		nodeHrefParamName="echo"
    		nodeTargets="result2"
    		contextmenu="{
    			items: { 
    				'create' : false,
    				'rename' : false,
    				'ccp' : false,
    				'remove' : { 
    					'label': 'Delete this Node', 
    					'action':  function (obj) { this.remove(obj); deleteTreeNode('%{echo}', obj); }
    				} 
    			} 
    		}"
    	/>

  <strong>Result Div :</strong>
  <div id="result2" class="result ui-widget-content ui-corner-all">Click on the AJAX Links above.</div>

	
</body>
</html>
